boot upstream kernel on A31(Mele M9)

make a bootable sd card

there is a mp tools for mele M9 for windows.

build kernel

there is a howto describe how to use the upstream kernel for Allwinner SOC. it could be apply to A31(sun6i) too.
gcc is linaro gcc 4.8(http://www.linaro.org/downloads/)

after contacts with Maxime, i got the lastest code for A31.

all the allwinner SOC support the arm multi-platform, so i could use multi_v7_defconfig for kernel:

ARCH=arm make multi_v7_defconfig

the u-boot is got from Mele m9 update image, which does not support device tree. So, i need enable the append dtb:
CONFIG_ARM_APPENDED_DTB=y

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs

generate the uImage including device tree blob:

cat arch/arm/boot/zImage arch/arm/boot/dts/sun6i-a31-colombus.dtb > arch/arm/boot/zImage_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -d arch/arm/boot/zImage_dtb arch/arm/boot/uImage_dtb

if the u-boot is the lastest one, only one comamnd is necessary:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 make uImage dtbs

build rootfs

i use the buildroot-2013.05 from http://buildroot.uclibc.org/.

the build config is here.

u-boot commands

fatload mmc 0:2 46000000 uImage_dtb
fatload mmc 0:2 48000000 uInitrd
bootm 46000000 48000000

know issue

If press keyboard before u-boot booted, the interrupt of uart could not used in linux. which means after kernel boot up, there is no log from filesystem.

references:

1, official website

2, Allwinner Axx SOC mainline status

author: bamv2005@gmail.com

2013-08-27 20:50 2306